package day2.Exer;

import java.util.Scanner;

public class Exer3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入文件名");
        String fileName = in.next();
        if(fileName.endsWith(".zip")||fileName.endsWith(".rar")){
           fileName=fileName.substring(0,fileName.lastIndexOf("."));
            char[]arr=fileName.toCharArray();
            for(int i=0;i<arr.length;i++){
                if((int)arr[i]<19968||((int)arr[i]>40869)){
                    System.out.println("作业命名不合适");
                    return;
                }
            }
            System.out.println("作业命名合适");
        }else{
            System.out.println("作业命名不合适");
        }
    }
}

